home *** CD-ROM | disk | FTP | other *** search
/ Gamers Delight 2 / Gamers Delight 2.iso / Aminet / game / role / Ang261Lib.lha / src / Makefile < prev    next >
Makefile  |  1994-10-22  |  6KB  |  203 lines

  1. ####
  2. # Please take a look at config.h for *critical* configuration steps needed.
  3. # BINDIR is the directory where the angband binary will be installed
  4.  
  5. BINDIR = Angband:
  6. PROGRAM = angband
  7.  
  8. ####
  9. # If you use gcc, you may find that adding '-traditional-cpp' will fix
  10. # defining the LIBDIR in config.h.  '-Dconst' may also help if your compiler
  11. # complains about conflicting definitions
  12.  
  13. CC = gcc
  14.  
  15. ####
  16. # Compiler flags
  17. ####
  18. # '-O' means optimize.  '-g' is for debugging.
  19. #
  20. # If you are using gcc, you may combine both '-O' and '-g'.  Also:
  21. # '-pipe' uses pipes rather than temporary files (which is faster).
  22. # '-pg' enables profiling (for coders only).  '-W<something>' provides
  23. # additional warnings.
  24. ####
  25. # Remove one of the '#' from the list of compiler flag choices below:
  26. ####
  27.  
  28. # For normal compilers (ie, 'cc' on anything but a NeXT).
  29. # Once you are sure it works, you can and should use '-O' instead.
  30. # CFLAGS = -Wall -O1
  31.  
  32. # For HPUX, the compiler flags for 'cc' should be:
  33. #CFLAGS = -Ae -Dunix -g
  34.  
  35. ####
  36. # For gcc (or NeXT) users only.
  37.  
  38. # Normal gcc users:
  39. # For SunOS 5.X (Solaris 2.X), add '-DSOLARIS'
  40. #CFLAGS = -g -O1 -pipe
  41. # for Amiga 
  42. CFLAGS = -O3
  43.  
  44. # Full optimization (but only when you know it works right!):
  45. #CFLAGS = -O4 -pipe -fomit-frame-pointer
  46.  
  47. # Full optimization on Amiga
  48. # CFLAGS = -O3 -m68030 -m68881
  49.  
  50. # Developers:
  51. #CFLAGS = -g -O1 -pipe -Wall -Wcast-align -Wpointer-arith -Wwrite-strings
  52.  
  53. # Anal developers:     [ :-) ]
  54. #CFLAGS = -g -O1 -pipe -Wall -Wcast-align -Wpointer-arith -Wwrite-strings \
  55.  -Wshadow -Wcast-align -Waggregate-return 
  56.  
  57. # Profiling:
  58. #CFLAGS = -pg -g -O1 -pipe-Wall -Wcast-align -Wpointer-arith -Wwrite-strings
  59.  
  60. ####
  61. # Libraries to link from
  62. ####
  63. # some people might be able to (or even might have to) remove '-lrpcsvc'
  64.  
  65. #LIBS = -lcurses -ltermcap -lrpcsvc
  66. LIBS = -lcurses -ltermcap 
  67.  
  68. ####
  69. # For Linux systems, this line should look like:
  70. # LIBS = -lncurses -ltermcap -lbsd
  71.  
  72. ####
  73. # For NCR System 3000, you'll probably need this:
  74. # LIBS=-lcurses -ltermcap -lmalloc -L/usr/ucblib -lucb
  75.  
  76. ####
  77. # For SunOS 5.X (Solaris 2.X), this line should look like:
  78. # LIBS = -ltermlib -ltermcap -lrpcsvc -lnsl -lucb
  79.  
  80. # For SunOS 5.X (Solaris 2.X), this line should look like:
  81. # ....unless you don't have the BSD/SunOS 4.x compatibility kit:
  82. # LIBS = -ltermlib -ltermcap -lrpcsvc -lnsl
  83.  
  84.  
  85. ####
  86. # If your system lacks the random() call, define EXTRAOBJS to include
  87. # random.o.  Otherwise, you can leave it out.
  88.  
  89. #EXTRAOBJS=random.o
  90.  
  91. ####
  92. # For SunOS 5.X (Solaris 2.X), if you don't have the BSD/SunOS 4.x
  93. # compatibility kit.  Also, be sure to define NEEDS_USLEEP in config.h
  94. # EXTRAOBJS=random.o bzero.o
  95.  
  96. # Otherwise, just use this:
  97. EXTRAOBJS=
  98.  
  99. # end of user configurable stuff
  100. #######
  101.  
  102. SOURCES = main.c misc1.c misc2.c store1.c files.c io.c create.c desc.c\
  103.     generate.c sets.c dungeon.c creature.c death.c eat.c help.c magic.c\
  104.     potions.c prayer.c save.c staffs.c wands.c scrolls.c spells.c\
  105.     wizard.c store2.c signals.c moria1.c moria2.c monsters.c\
  106.     treasure.c variable.c recall.c unix.c undef.c\
  107.     player.c tables.c describe_mon.c rods.c random.c util.c bzero.c
  108.  
  109. OBJECTS = main.o misc1.o misc2.o store1.o files.o io.o create.o desc.o\
  110.     generate.o sets.o dungeon.o creature.o death.o eat.o help.o magic.o\
  111.     potions.o prayer.o save.o staffs.o wands.o scrolls.o spells.o\
  112.     wizard.o store2.o signals.o moria1.o moria2.o monsters.o\
  113.     treasure.o variable.o recall.o unix.o undef.o\
  114.     player.o tables.o describe_mon.o rods.o util.o $(EXTRAOBJS)
  115.  
  116. LIBFILES = hours news origcmds.hlp owizcmds.hlp roglcmds.hlp rwizcmds.hlp \
  117.     scores version.hlp welcome.hlp
  118.  
  119. default: all
  120.  
  121. all: $(PROGRAM)
  122.  
  123. .c.o:
  124.     $(CC) $(CFLAGS) -c $*.c
  125.  
  126. $(PROGRAM): $(OBJECTS)
  127.     $(CC) $(CFLAGS) $(OBJECTS) -o $(PROGRAM) $(LIBS)
  128.  
  129. install:    $(PROGRAM)
  130.     cp $(PROGRAM) $(BINDIR)/$(PROGRAM)
  131.     chown games.bin $(BINDIR)/$(PROGRAM)
  132.     chmod 4511 $(BINDIR)/$(PROGRAM)
  133.  
  134. clean:;
  135.     rm -f *.o ./core *~ .*~ temp1 temp2 gmon.*
  136.  
  137. realclean: clean
  138.     rm -f $(PROGRAM)
  139.  
  140. spotless: clean
  141.     rm -f $(PROGRAM)
  142.     rm -f $(BINDIR)/$(PROGRAM)
  143.  
  144. depend:
  145.     /usr/local/bin/X11/makedepend $(INCLUDES) -p$(OBJDIR)/ $(SRCS)
  146.  
  147. ####
  148. # verify that the monsters.c and describe_mon.c files correspond
  149.  
  150. check:
  151.     @/bin/rm -f temp1 temp2
  152.     @egrep '^{' monsters.c | awk -F\" '{print $$2}' > temp1
  153.     @egrep '^{' describe_mon.c | awk -F\" '{print $$2}' > temp2
  154.     @echo Monster name problems present:
  155.     @diff -c1 temp1 temp2
  156.  
  157. query:
  158.     @echo "Monsters.c:"
  159.     egrep '^{"' monsters.c | wc -l
  160.     @echo "Describe_Mon.c:"
  161.     egrep '^{"' describe_mon.c | wc -l
  162.  
  163. create.o: constant.h types.h externs.h config.h
  164. creature.o: constant.h types.h externs.h config.h monster.h
  165. death.o: constant.h types.h externs.h config.h
  166. desc.o: constant.h types.h externs.h config.h
  167. dungeon.o: constant.h types.h externs.h config.h
  168. eat.o: constant.h types.h externs.h config.h
  169. files.o: constant.h types.h externs.h config.h
  170. generate.o: constant.h types.h externs.h config.h
  171. help.o: constant.h types.h externs.h config.h monster.h
  172. io.o: constant.h types.h externs.h config.h
  173. magic.o: constant.h types.h externs.h config.h
  174. main.o: constant.h types.h externs.h config.h
  175. misc1.o: constant.h types.h externs.h config.h monster.h
  176. misc2.o: constant.h types.h externs.h config.h monster.h
  177. monsters.o: constant.h types.h config.h monster.h
  178. moria1.o: constant.h types.h externs.h config.h monster.h
  179. moria2.o: constant.h types.h externs.h config.h monster.h
  180. player.o: constant.h types.h config.h
  181. potions.o: constant.h types.h externs.h config.h
  182. prayer.o: constant.h types.h externs.h config.h monster.h
  183. recall.o: constant.h config.h types.h externs.h monster.h
  184. rnd.o: constant.h types.h
  185. save.o: constant.h types.h externs.h config.h
  186. scrolls.o: constant.h types.h externs.h config.h monster.h
  187. sets.o: constant.h config.h types.h
  188. signals.o: constant.h types.h externs.h config.h
  189. spells.o: constant.h types.h externs.h config.h monster.h
  190. staffs.o: constant.h types.h externs.h config.h monster.h
  191. store1.o: constant.h types.h externs.h config.h
  192. store2.o: constant.h types.h externs.h config.h
  193. tables.o: constant.h types.h config.h
  194. treasure.o: constant.h types.h config.h
  195. unix.o: constant.h config.h types.h externs.h
  196. variable.o: constant.h types.h config.h
  197. rods.o: constant.h types.h externs.h config.h monster.h
  198. wands.o: constant.h types.h externs.h config.h monster.h
  199. wizard.o: constant.h types.h externs.h config.h
  200. describe_mon.o: monster.h externs.h types.h
  201.  
  202. # DO NOT DELETE THIS LINE -- make depend depends on it.
  203.